<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title><?php echo ($title); ?></title>
    <link rel="stylesheet" href="/Public/web/css/pintuer.css">
    <link rel="stylesheet" href="/Public/web/css/admin.css">
    <script src="/Public/web/js/jquery.js"></script>
    <script src="/Public/web/js/pintuer.js"></script>
</head>


<body>
  <div class="panel admin-panel margin-top">
    <div class="panel-head" id="add"><strong><span class="icon-pencil-square-o"></span> <?php echo L("tianjia");?></strong></div>
    <div class="body-content">
      <form method="post" class="form-x" action="?" enctype="multipart/form-data">
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('menmianmingcheng');?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="store_name" data-validate="required:<?php echo L('qingshuru'); echo L('menmianmingcheng');?>"/>
            <div class="tips"></div>
          </div>
        </div>

        <div class="form-group">
          <div class="label">
            <label>请输入门面appId：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="appid" data-validate="required:请输入门面appId"/>
            <div class="tipss"></div>
          </div>
        </div>

        <div class="form-group">
          <div class="label">
            <label>appsecret：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="secret" data-validate="required:请输入门面appsecret"/>
            <div class="tipss"></div>
          </div>
        </div>

        <div class="form-group">
          <div class="label">
            <label>请输入门面app_key：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="app_key" data-validate="required:请输入门面app_key"/>
            <div class="tipss"></div>
          </div>
        </div>

        <div class="form-group">
          <div class="label">
            <label>请输入门面商户ID：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="mch_id" data-validate="required:请输入门面商户ID"/>
            <div class="tipss"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('menmiandizhi');?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="store_address" data-validate="required:<?php echo L('qingshuru'); echo L('menmiandizhi');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>请输入门面联系人：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="store_user" data-validate="required:请输入门面联系人"/>
            <div class="tipss"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L("suolvetu");?>：</label>
          </div>
          <div class="field">
            <input type="file" class="button bg-blue" name="cate_thumb" value="+ <?php echo L('liulanshangchuan');?>" onchange="preview(this)" style="float: left;">
            <div id="preview" name="img" style="float: left;width: 10%;box-sizing: border-box;" class="input" >
              <?php if(empty($info['company_logo'])): ?><img src="/Public/images/zanwu.jpg" width="100%" />
                <?php else: ?>
                <img src="/<?php echo ($info['thumb']); ?>" width="100%" /><?php endif; ?>
            </div>
            <div class="tipss"><?php echo L("tuijianchicun");?>：100*100</div>
          </div>
        </div>
        <div class="tipss"></div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('menmiandianhua');?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="store_tel" data-validate="required:<?php echo L('qingshuru'); echo L('menmiandianhua');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>请输入门面营业时间：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="store_time" data-validate="required:请输入门面营业时间"/>
            <div class="tipss">输入格式如:9:00-22:00</div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('menmianyouxiang');?>：</label>
          </div>
          <div class="field">
            <input type="email" class="input w50" name="store_email" data-validate="required:<?php echo L('qingshuru'); echo L('menmianyouxiang');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('weixingongzhonghao');?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="store_public" data-validate="required:<?php echo L('qingshuru'); echo L('weixingongzhonghao');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('jingdu');?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="address_lng" data-validate="required:<?php echo L('qingshuru'); echo L('jingdu');?>"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label><?php echo L('qingshuru'); echo L('weidu');?>：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="address_lat" data-validate="required:<?php echo L('qingshuru'); echo L('weidu');?>"/>
            <div class="tipss">tip:公司经纬度可通过<a href="http://lbs.qq.com/tool/getpoint/index.html" target="_blank">http://lbs.qq.com/tool/getpoint/index.html</a>获取</div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label>门店简介：</label>
          </div>
          <div class="field">
            <input type="text" class="input w50" name="intro" data-validate="请输入门店简介"/>
            <div class="tips"></div>
          </div>
        </div>
        <div class="form-group">
          <div class="label">
            <label></label>
          </div>
          <div class="field">
            <button class="button bg-main icon-check-square-o" type="submit"><?php echo L('tianjia');?></button>
          </div>
        </div>
      </form>
    </div>
  </div>
</body>
<script>
  function preview(file)
  {
    var prevDiv = document.getElementById('preview');
    if (file.files && file.files[0])
    {
      var reader = new FileReader();
      reader.onload = function(evt){
        prevDiv.innerHTML = '<img src="' + evt.target.result + '" width="100%" />';
      }
      reader.readAsDataURL(file.files[0]);
    }
    else
    {
      prevDiv.innerHTML = '<div class="img" style="filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale,src=\'' + file.value + '\'"></div>';
    }
  }
</script>
</html>